package com.lekang.mapper;

import java.util.List;
import com.lekang.domain.AppointmentRegistration;

/**
 * 预约登记Mapper接口
 * 
 * @author chengbingzhen
 * @date 2025-10-13
 */
public interface AppointmentRegistrationMapper 
{
    /**
     * 查询预约登记
     * 
     * @param id 预约登记主键
     * @return 预约登记
     */
    public AppointmentRegistration selectAppointmentRegistrationById(Long id);

    /**
     * 查询预约登记列表
     * 
     * @param appointmentRegistration 预约登记
     * @return 预约登记集合
     */
    public List<AppointmentRegistration> selectAppointmentRegistrationList(AppointmentRegistration appointmentRegistration);

    /**
     * 查询预约登记列表（微信用户）
     *
     * @param appointmentRegistration 预约登记
     * @return 预约登记集合
     */
    public List<AppointmentRegistration> selectAppointmentRegistrationListByWxUser(AppointmentRegistration appointmentRegistration);

    /**
     * 新增预约登记
     * 
     * @param appointmentRegistration 预约登记
     * @return 结果
     */
    public int insertAppointmentRegistration(AppointmentRegistration appointmentRegistration);

    /**
     * 修改预约登记
     * 
     * @param appointmentRegistration 预约登记
     * @return 结果
     */
    public int updateAppointmentRegistration(AppointmentRegistration appointmentRegistration);

    /**
     * 删除预约登记
     * 
     * @param id 预约登记主键
     * @return 结果
     */
    public int deleteAppointmentRegistrationById(Long id);

    /**
     * 批量删除预约登记
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAppointmentRegistrationByIds(Long[] ids);

     /**
     * 按wx_user_id统计当天（create_time）内appointment_type为“参观预约”的数据条数
     *
     * @param wxUserId 用户主键
     * @return 预约登记数量
     */
    public int selectTodayVisitCountByWxUserId(Long wxUserId);

     /**
     * 按wx_user_id统计当天（create_time）内appointment_type为“探访预约”的数据条数
     *
     * @param wxUserId 用户主键
     * @return 预约登记数量
     */
    public int selectTodaySeekCountByWxUserId(Long wxUserId);

     /**
     * 按wx_user_id统计当天（create_time）内status为“已取消”的数据条数
     *
     * @param wxUserId 用户主键
     * @return 预约登记数量
     */
    public int selectTodayCanceledCountByWxUserId(Long wxUserId);
}
